<!DOCTYPE html>
<html lang="zh-cn">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta name="renderer" content="webkit">
<title></title>
<link rel="stylesheet" href="__CSS__/pintuer.css?v={$src_version}">
<link rel="stylesheet" href="__CSS__/admin.css?v={$src_version}">
<link rel="stylesheet" href="__CSS__/responsive.css?v={$src_version}">
<script src="__JS__/jquery-3.2.1.min.js?v={$src_version}"></script>
<script src="__JS__/pintuer.js?v={$src_version}"></script>
<script src="__JS__/jquery.nicescroll.js"></script>
<script src="__PUBLIC__/layer.js?v={$src_version}"></script>
<script src="__JS__/ming.js?v={$src_version}"></script>
<script src="__JS__/ifram_scroll.js?v={$src_version}"></script>
<script src="__JS__/responsive.js?v={$src_version}"></script>   
</head>
<body>
<div class="panel admin-panel">
  <div class="panel-head"><strong class="icon-reorder"> 幻灯列表</strong>
   <button type="button" class="button border-yellow" onclick="window.location.href='{:U('Slide/add')}'" style="margin-left:20px; padding:3px 5px; ">
    <span class="icon-plus-square-o"></span>
     增加 
    </button>
  </div>
  
  <table class="table table-hover text-center">
    <tr>
     <th>所属分类</th>
      <th>标题</th>
      <th>图片</th>
      <th>链接</th>
      <th>排序</th>
      <th>操作</th>
    </tr>
     
   <volist name="slide" id="v">
     <tr> 
       <td> 
       <volist name=":C('ztype')" id="vv">
       
          <if condition="$vv['val'] eq $v['ztype']">{$vv.txt}</if>
       
       </volist>
       
       </td>
      <td>{$v.slide_title}</td>
      <td> <if condition="$v['pic'] neq ''">
        <img src="/{$v.pic}"  style="display:block; margin:0 auto; height:30px; width:auto; overflow:hidden;" />
      </if></td>
      <td>{$v.url}</td>
      <td>{$v.sort}</td>
      <td>
      <div class="button-group">
      <a class="button border-main" href="{:U('Slide/add')}?id={$v.slid}" >
      <span class="icon-edit"></span> 修改</a> 
     
      <a class="button border-red"   href="javascript:void(0)" onclick="return del({$v.slid});">  
       <span class="icon-trash-o"></span>  删除</a>
    
      </div> </td>
   </tr>
   </volist> 
   
   
      <?php 
         
          if(intval(count($slide))>0){
          
        
         
          }else
          {
              echo "<tr><td colspan='80'><div class='pagelist'> ";
          
              echo '暂无记录';
              
              echo '</div></td></tr>';
          
          }

         ?>  
    
  </table>
</div>
 <script type="text/javascript">
function del(id){
	if(layer.confirm("您确定要删除吗?")){			
		$.ajax({
			type:'post',
			url:"{:U('Slide/del')}",
			data:{id:id},
			dataType:'json',
			success:function(res){
                layer.msg(res.msg);
			    res.code=='1'?setTimeout("goURL('"+res.url+"')",500):'';
			}
		});
	}
}


</script>
 
</body>
</html>